package com.atguigu.springboot.controller;

import com.atguigu.springboot.bean.User;
import com.atguigu.springboot.mapper.UserMapper;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author： lijun
 * @date： 2020-08-06 00:41
 */

@RestController
public class UserController
{
    @Resource
    private UserMapper userMapper;

    @RequestMapping("/users")
    public String testUserMapper(){
        List<User> users = userMapper.selectAllUser();
        users.forEach(user->{
            System.out.println(user);
        });
        return "hello";
    }
}
